package com.haizhi.crm.sys.auth.constant;

import com.haizhi.crm.common.model.Status;

/**
 * Created by caochao on 2018/05/22.
 */
public enum AuthStatus implements Status {

    NAME_PASSWD_MISMATCH(10001, "用户名或密码错误" ),
    USER_NOT_LOGINED(10002, "用户未登录" ),
    USER_UNAUTH(-1, "用户未授权" ),
    USER_Id_NULL(10003, "不能获取当前用户ID" ),
    USER_NOTEXISTS(10004, "用户不存在" ),
    USER_LOGOUT_FAIL(10005, "用户登出失败" ),
    USER_RELOAD_PERMISSION_FAIL(10006, "用户重新加载权限失败" ),
    ;

    private int code;
    private String desc;

    AuthStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    ;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
